/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.afcepf.projet2.metiers.donnees.entites.commandes;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

/**
 *
 * @author sylva_000
 */
@Entity
@NamedQueries({
    @NamedQuery(name = "ModePaiement.findAll", query = "SELECT m FROM ModePaiement m")})
public class ModePaiement implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "idModePaiement")
    private Long idModePaiement;
    @Column(length = 15, nullable = false, unique = true,
    name = "ModePaiement")
    private String ModePaiement;

    public Long getIdModePaiement() {
        return idModePaiement;
    }

    public void setIdModePaiement(Long idModePaiement) {
        this.idModePaiement = idModePaiement;
    }

    public String getModePaiement() {
        return ModePaiement;
    }

    public void setModePaiement(String ModePaiement) {
        this.ModePaiement = ModePaiement;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idModePaiement != null ? idModePaiement.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ModePaiement)) {
            return false;
        }
        ModePaiement other = (ModePaiement) object;
        if ((this.idModePaiement == null && other.idModePaiement != null) || (this.idModePaiement != null && !this.idModePaiement.equals(other.idModePaiement))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.afcepf.projet2.entities.commandes.ModePaiement[ id=" + idModePaiement + " ]";
    }
}
